package com.stylefeng.guns.modular.system.warpper;

import java.util.Date;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;
import com.stylefeng.guns.core.util.DateUtil;

public class DashBoardDetailWarpper extends BaseControllerWarpper{

	public DashBoardDetailWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
    	String gPlate = (String)map.get("gPlate");
    	Date gTime = (Date)map.get("gTime");
    	if(StringUtils.contains(gPlate, "下跌")
    			|| StringUtils.contains(gPlate, "下挫") || StringUtils.contains(gPlate, "走弱")){
    		map.put("context", "<font color='green' font size='3'><b>" +DateUtil.getTimeByDate(gTime)+"&nbsp;&nbsp;&nbsp; "+gPlate+"</b></font></br>");
    	}else{
    		map.put("context", "<font color='red' font size='3'><b>" +DateUtil.getTimeByDate(gTime)+"&nbsp;&nbsp;&nbsp; "+gPlate+"</b></font></br>");
    	}
    }
}
